package org.wolfengi.handler.common;

import org.apache.hadoop.io.Text;
import org.apache.hadoop.io.WritableComparable;
import org.apache.hadoop.io.WritableComparator;

/**
 * @Author: wolfengi
 * @Description: ${TODO}
 * @Date: Created in 10:16 2020/5/20
 * @Modified By:
 */
public class ComparatorForqn extends WritableComparator {

    public ComparatorForqn() {
        super(Text.class, true);
    }

    @Override
    public int compare(WritableComparable a, WritableComparable b) {
        Text a1 = (Text) a;
        Text b1 = (Text) b;
        if (a1.toString().trim().equals(b1.toString().trim())) {
            return 0;
        } else {
            return -1;
        }

    }
}
